package com.aube.mis.exception;

import com.aube.mis.enums.ResponseCode;

public class MisException extends RuntimeException {

	private static final long serialVersionUID = 1L;

	/** 异常代码 */
	private String code;

	/** 异常信息 */
	private String message;

	public MisException(ResponseCode codeEnum, Throwable t) {
		super(t);
		this.code = codeEnum.getCode();
		this.message = codeEnum.getMsg();
	}

	public MisException(ResponseCode codeEnum) {
		this.code = codeEnum.getCode();
		this.message = codeEnum.getMsg();
	}

	public MisException(ResponseCode codeEnum, String message) {
		this.code = codeEnum.getCode();
		this.message = message;
	}

	public MisException(String code, String message) {
		this.code = code;
		this.message = message;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
}
